﻿/*
 * Created by SharpDevelop.
 * User: Masy Freddy
 * Date: 15/09/2011
 * Time: 07:27
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.IO;

namespace MetaVideoEditorEvolved.Helper
{
	/// <summary>
	/// Description of ApplicationPath.
	/// </summary>
	public static class ApplicationPath
	{
		private const string NameApplicationData = "MetaVideoEditorEvolved";
		private static string commonApplicationData, 
							  addInConfiguration,
							  logs;
		
		static ApplicationPath()
		{
			commonApplicationData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), NameApplicationData);
			AddInConfiguration = Path.Combine(commonApplicationData, "AddIn");
			Logs = Path.Combine(commonApplicationData, "Logs");
		}
		
		public static string CommonApplicationData
		{
			get
			{
				return commonApplicationData;
			}
		}
		
		public static string AddInConfiguration { 
			get
			{
				return addInConfiguration;
			}
			private set
			{
				addInConfiguration = value;
				
				if(!Directory.Exists(value))
				{
					Directory.CreateDirectory(value);
				}
			}
		}
		
		public static string Logs { 
			get
			{
				return logs;
			}
			private set
			{
				logs = value;
				
				if(!Directory.Exists(value))
				{
					Directory.CreateDirectory(value);
				}
			}
		}
	}
}